<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <p>Hello World</p>
</body>
<script id="tpl" type="text/template">
    <select id="demoSelect">
        <option value="">--请选择--</option>
    </select>
</script>
<script>
    let tpl = document.getElementById('tpl').innerHTML;
    document.body.innerHTML += tpl;
    let options = document.getElementById('demoSelect').options;
    options.add(new Option('Java', 'java'));
    options.add(new Option('Vue', 'vue'));
</script>
</html>